package com.igd.security;

import java.util.Date;
import java.util.List;

import com.igd.pojo.vo.ComboxData;
import com.igd.utils.CommonUtil;
import com.igd.utils.DateUtil;

/**
 * createDate:2013-6-15
 *
 * author:QIAOYU
 *
 * version:1.0
 *
 * description:权限控制角色数据类
 */

public class Roles {
	
	private final String listKey = "role.status.list";
	
	private final String valKey = "role.status";
	
	/**角色编号*/
	private String rolesId;
	
	/**角色名称*/
	private String rolesName;
	
	/**角色代码*/
	private String rolesCode;
	
	/**角色状态*/
	private String rolesStatus;
	
	private List<ComboxData> rolesStatusMapping = CommonUtil.toComboxList(listKey, valKey);
	
	/**角色创建时间*/
	private String rolesCreateTime;
	
	/**角色创建时间格式化字段*/
	private Date rolesCreateTimeFormat;
	
	/**角色创建用户*/
	private String rolesCreateUser;
	
	/**角色对应资源集合*/
	private List<Resources> roleResources;
	
	/**角色对应用户编号*/
	private String roleUserId;
	
	/**角色创建用户对应用户名*/
	private String rolesCreateUserName;
	
	public String getRolesId() {
		return rolesId;
	}

	public void setRolesId(String rolesId) {
		this.rolesId = rolesId;
	}

	public String getRolesName() {
		return rolesName;
	}

	public void setRolesName(String rolesName) {
		this.rolesName = rolesName;
	}

	public String getRolesCode() {
		return rolesCode;
	}

	public void setRolesCode(String rolesCode) {
		this.rolesCode = rolesCode;
	}

	public String getRolesStatus() {
		return rolesStatus;
	}

	public void setRolesStatus(String rolesStatus) {
		this.rolesStatus = rolesStatus;
	}

	public String getRolesCreateTime() {
		return rolesCreateTime;
	}

	public void setRolesCreateTime(String rolesCreateTime) {
		this.rolesCreateTime = rolesCreateTime;
		this.rolesCreateTimeFormat = DateUtil.formateStringToDate(this.rolesCreateTime,DateUtil.FORMAT_TO_14);
	}

	public String getRolesCreateUser() {
		return rolesCreateUser;
	}

	public void setRolesCreateUser(String rolesCreateUser) {
		this.rolesCreateUser = rolesCreateUser;
	}

	public List<Resources> getRoleResources() {
		return roleResources;
	}

	public void setRoleResources(List<Resources> roleResources) {
		this.roleResources = roleResources;
	}

	public String getRoleUserId() {
		return roleUserId;
	}

	public void setRoleUserId(String roleUserId) {
		this.roleUserId = roleUserId;
	}

	public Date getRolesCreateTimeFormat() {
		return rolesCreateTimeFormat;
	}

	public void setRolesCreateTimeFormat(Date rolesCreateTimeFormat) {
		this.rolesCreateTimeFormat = rolesCreateTimeFormat;
	}

	public List<ComboxData> getRolesStatusMapping() {
		return rolesStatusMapping;
	}

	public void setRolesStatusMapping(List<ComboxData> rolesStatusMapping) {
		this.rolesStatusMapping = rolesStatusMapping;
	}

	public String getRolesCreateUserName() {
		return rolesCreateUserName;
	}

	public void setRolesCreateUserName(String rolesCreateUserName) {
		this.rolesCreateUserName = rolesCreateUserName;
	}
}
